package com.antis.olsl.data.adapter;

import com.antis.olsl.data.R;
import com.antis.olsl.data.response.GetPosTurnoverResp;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.module.LoadMoreModule;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

public class PosTurnoverAdapter extends BaseQuickAdapter<GetPosTurnoverResp.ContentBean.PosListBean, BaseViewHolder> implements LoadMoreModule {
    public PosTurnoverAdapter(int layoutResId, @Nullable List<GetPosTurnoverResp.ContentBean.PosListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder helper, GetPosTurnoverResp.ContentBean.PosListBean item) {
        helper.setText(R.id.text_date, item.date);
        helper.setText(R.id.text_pos_number, item.posNumber);
        helper.setText(R.id.text_sales_volume, item.salesVolume);
        helper.setText(R.id.text_total_received, item.totalReceived);
    }
}
